    import request from '@/utils/request.js'

    export const deptApi={
        list(deptQuery){
            return request.get('/dept/list',{params:deptQuery})
        },
		deleteById(id) {
			return request.delete( `/dept/deleteById/${id}`)   //反引号，直接写参数。否则需要字符串拼接
		},
		deleteAll(ids) {
			return request.delete( `/dept/deleteAll/${ids}`)
		},
		add(dept) {
			//以JSON形式传递到后台
			return request.post('/dept/add', dept)
		},
		selectById(id) {
			return request.get(`/dept/selectById/${id}`)
		},
		update(dept) {
			return request.put('/dept/update', dept)
		},
		selectAll(){
			return request.get('/dept/selectAll')
		},
		updateStatus(id,status){
			return request.put(`/dept/updateStatus/${id}/${status}`)
		},
	}
    

